var advertisement = {
    list:function(){
        $.ajax({
            type: "GET",
            url: config.baseURL + "advertisement/list.json",
            cache:false,
            dataType: "json",
            success: function(data){
                if(data.result == 'success'){
                	$.each(data.homeAdList,function(index,obj){
                		$('#homeAd'+(index+1)+'Link').attr('href',obj.link);
                		$('#homeAd'+(index+1)+'Img').attr('src',config.baseURL+obj.imagePath);
                	});
                }else{
                    $.msgBox.alert({
                        title:'Tips',
                        msg:'System error!Please try again later!',
                        icon:'warning',
                        width:350
                    });
                }
            }
        });
    }
};